<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<title>Windows Interface Reference: Scrollbar structure</title>
</head>

<body>

<h1>Scrollbar </h1>

<p>The Scrollbar structure contains functions and styles for scroll bars and functions to
scroll windows.</p>

<pre>structure Scrollbar:
sig
    type HWND and HDC and HRGN
    type RECT =  { left: int, top: int, right: int, bottom: int }

    structure Style:
    sig
        include BIT_FLAGS where type flags = Window.Style.flags
        val WS_OVERLAPPED: flags and WS_POPUP: flags and WS_CHILD: flags and WS_MINIMIZE: flags
        and WS_VISIBLE: flags and WS_DISABLED:flags and WS_CLIPSIBLINGS:flags
        and WS_CLIPCHILDREN:flags and WS_MAXIMIZE:flags and WS_CAPTION:flags
        and WS_BORDER:flags and WS_DLGFRAME:flags and WS_VSCROLL:flags and WS_HSCROLL:flags
        and WS_SYSMENU:flags and WS_THICKFRAME:flags and WS_GROUP:flags and WS_TABSTOP:flags
        and WS_MINIMIZEBOX:flags and WS_MAXIMIZEBOX:flags and WS_TILED:flags and WS_ICONIC:flags
        and WS_SIZEBOX:flags and WS_OVERLAPPEDWINDOW:flags and WS_TILEDWINDOW:flags
        and WS_POPUPWINDOW:flags and WS_CHILDWINDOW:flags
        and SBS_HORZ:flags and SBS_VERT:flags and SBS_TOPALIGN:flags and SBS_LEFTALIGN:flags
        and SBS_BOTTOMALIGN:flags and SBS_RIGHTALIGN:flags and SBS_SIZEBOXTOPLEFTALIGN:flags
        and SBS_SIZEBOXBOTTOMRIGHTALIGN:flags and SBS_SIZEBOX:flags and SBS_SIZEGRIP:flags
    end

    type enableArrows = { enableLeftUp: bool, enableRightDown: bool }

    val ESB_ENABLE_BOTH: enableArrows
    val ESB_DISABLE_BOTH: enableArrows
    val ESB_DISABLE_LEFT: enableArrows
    val ESB_DISABLE_RIGHT: enableArrows
    val ESB_DISABLE_UP: enableArrows
    val ESB_DISABLE_DOWN: enableArrows

    type SCROLLINFO =
        { minPos: int, maxPos: int, pageSize: int, pos: int, trackPos: int }

    datatype ScrollInfoOption =
        SIF_RANGE | SIF_PAGE | SIF_POS | SIF_DISABLENOSCROLL | SIF_TRACKPOS

    val SIF_ALL : ScrollInfoOption list

    datatype ScrollBarType = SB_BOTH | SB_CTL | SB_HORZ | SB_VERT
    datatype ScrollWindowFlag = SW_ERASE | SW_INVALIDATE | SW_SCROLLCHILDREN

    val EnableScrollBar : HWND * ScrollBarType * enableArrows -&gt; unit
    val GetScrollInfo : HWND * ScrollBarType * ScrollInfoOption list -&gt; SCROLLINFO
    val GetScrollPos : HWND * ScrollBarType -&gt; int
    val ScrollDC : HDC * int * int * RECT * RECT * HRGN -&gt; RECT
    val ScrollWindow : HWND * int * int * RECT * RECT -&gt; unit
    val ScrollWindowEx : HWND * int * int * RECT * RECT * HRGN * ScrollWindowFlag list -&gt; RECT
    val SetScrollInfo :
        HWND * ScrollBarType * ScrollInfoOption list * SCROLLINFO * bool -&gt; int
    val SetScrollPos : HWND * ScrollBarType * int * bool -&gt; int
    val SetScrollRange : HWND * ScrollBarType * int * int * bool -&gt; bool
    val ShowScrollBar : HWND * ScrollBarType * bool -&gt; unit
end
=</pre>
</body>
</html>
